<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div class="div1">
			<p><b>水平居中对齐</p>
		</div>
		<div class="div2">
			<p><b>文本居中对齐</p>
		</div>
		<div class="div3">
			<p><b>垂直居中对齐</p>
		</div>
		<div class="div5">
			<p><b>垂直居中对齐2</p>
		</div>
		<div class="div4">
			<p><b>水平垂直居中对齐</p>
		</div>
	</body>
	<style>
		.div1{
			height: 100px;
			margin: auto;
			width: 60%;
			border: 3px solid #73AD21;
			padding: 10px;
		}
		.div2{
			text-align: center;
			border: 3px solid green;
		}
		.div3{
			padding: 70px 0;
			border: 3px solid green;
		}
		.div4{
			padding: 70px 0;
			border: 3px solid green;
			text-align: center;
		}
		.div5{
			line-height: 200px;
			height: 200px;
			border: 3px solid green;
		}
	</style>
</html>